package com.yhq.basic.jvm.classload.others;

/**
 * @author hqyin
 * @date 2023/3/1 3:41 下午
 */
public class Math {
    public static final int SIZE = 666;
    public static int length = 555;
    public static User user = new User();

    static {
        System.out.printf("load Math,Size:%d,length:%d,user:%s", Math.SIZE, length, user);
    }

    public Math() {
        System.out.println("构造方法");
    }

    {
        System.out.println("代码块");
    }

    public int compute() {
        int a = 1;
        int b = 2;
        int c = (a + b) * 3;
        return c;
    }

    public static void main(String[] args) {
        Math math = new Math();
        math.compute();
    }

}
